Repository navigation
drm/msm: sc8180x: restore dp_phy_intf_sel and DP AUX state on s2idle resume - #202
Open
robertijtsma wants to merge 2 commits into
Open
robertijtsma wants to merge 2 commits into
robertijtsma wants to merge 2 commits into
Conversation
On SC8180X, DPU_MDP_DP_PHY_INTF_SEL is currently programmed only once during dpu_kms_hw_init(). When MDSS/DPU loses register state across runtime suspend or s2idle suspend/resume, the DP <-> PHY interface selection is not restored, leaving eDP/DP output misrouted after resume. Extract dpu_kms_setup_dp_phy_intf_sel() and call it from both dpu_kms_hw_init() and dpu_runtime_resume(). Tested on Microsoft Surface Pro X SQ2 (SC8180X) across s2idle suspend and resume. Signed-off-by: robertijtsma <37256770+robertijtsma@users.noreply.github.com>
On SC8180X / Surface Pro X, eDP and external HPD-bridge DP controllers leave internal HPD_CTRL disabled. Across runtime suspend or s2idle suspend/resume, three AUX issues prevent reliable link re-training: 1. msm_dp_aux_reset() does not clear REG_DP_AUX_TRANS_CTRL before pulsing DP_AUX_CTRL_RESET, which can leave a stale transaction bit latched on reset. 2. msm_dp_aux_enable() relies on internal HPD setup to enable the 1us REG_DP_DP_HPD_REFTIMER; when internal HPD is disabled, AUX timeouts stall after power collapse unless DP_DP_HPD_REFTIMER_ENABLE is set. 3. msm_dp_aux_is_link_connected() reads REG_DP_DP_HPD_INT_STATUS even when DP_DP_HPD_CTRL_HPD_EN is clear, returning 0 and skipping AUX reset on transfer error for external HPD bridges. Clear REG_DP_AUX_TRANS_CTRL in msm_dp_aux_reset(), ensure DP_DP_HPD_REFTIMER_ENABLE is set in msm_dp_aux_enable(), and fall back to aux->enable_xfers when internal HPD_CTRL is disabled. Tested on Microsoft Surface Pro X SQ2 (SC8180X) across s2idle suspend and resume. Signed-off-by: robertijtsma <37256770+robertijtsma@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes blank eDP/DP display after
s2idlesuspend/resume on SC8180X / Surface Pro X via two atomic commits:drm/msm/dpu: sc8180x: restore dp_phy_intf_sel on runtime resume: extractsdpu_kms_setup_dp_phy_intf_sel()and invokes it from bothdpu_kms_hw_init()anddpu_runtime_resume()soDPU_MDP_DP_PHY_INTF_SELis restored after MDSS power collapse.drm/msm/dp: restore AUX reftimer and check xfer state for external HPD: clearsREG_DP_AUX_TRANS_CTRLbeforeDP_AUX_CTRL_RESET, ensuresDP_DP_HPD_REFTIMER_ENABLEis set inmsm_dp_aux_enable()when internal HPD is unused, and falls back toaux->enable_xfersinmsm_dp_aux_is_link_connected()whenDP_DP_HPD_CTRL_HPD_ENis clear (eDP / external HPD bridges).Verification
scripts/checkpatch.plwith 0 errors, 0 warnings.s2idlesuspend/resume cycles.